﻿using Core.IService;
using Core.Models;
using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Core.Service
{
    public partial class SysDictionaryService:ISysDictionaryService
    {
        
        public async Task<List<SysDictionary>> GetListByTypeAsync(string typeName)
        {
            var type = await baseRepostory.Find<SysDictionaryType>(n => n.Name == typeName).Include("Dictionaries").FirstOrDefaultAsync();
            return type.Dictionaries.ToList();
        }
    }
}
